
#ifndef _ABS_CREATOR_H_
#define _ABS_CREATOR_H_


#include <QMap>
#include <iostream>

#include "CoreApi.hpp"
#include "AbstractObject.hpp"
#include "AbstractApplication.hpp"
#include "AbstractWindow.hpp"
#include "AbstractApplication.hpp"

namespace NSCore {

	class COREAPI  AbstractCreator :
		public QObject,
		public AbstractObject 
	{
		Q_OBJECT
	protected:
		AbstractWindow* m_mainw{};
		AbstractApplication* m_app;

		int m_argc{};
		char** m_argv{};
		bool m_cmd_mode{ false };
		QMap<QString/*arg*/, std::function<void(void)>> m_cmd_func;

	public:
		AbstractCreator(int argc, char* argv[]);
		virtual ~AbstractCreator();

	public:
		virtual void run();
		virtual void noGui();
		virtual void extractArgs();

		virtual AbstractWindow* getMainWindow() { return m_mainw; };
		virtual AbstractApplication* getApp() { return m_app; };
		virtual inline QString className() override { return "AbstractCreator"; };

		/*CMD���ú���*/
		static void _help_();
		static void _version_();


	};

}

#endif




